/*
 * deviceManage.h
 *
 *  Created on: 2025.4.8
 *      Author: TracyHenry
 */

 #ifndef DEVICEMANAGE_H_
 #define DEVICEMANAGE_H_

#include "addr.h"

DeviceInfo* addDevice(DeviceInfo *head, const char *deviceId, const char *productId);
void saveDeviceByDflash(DeviceInfo *head);
DeviceInfo* deleteDevice(DeviceInfo *head, const char *deviceId);
int updateDeviceStatus(DeviceInfo *head, const char *deviceId, const char *newDeviceType, const uint8 newDeviceStatus);
DeviceInfo* findDevice(DeviceInfo *head, const char *deviceId);
void printDevices(DeviceInfo *head);
void freeDevices(DeviceInfo *head);
uint8 initDeviceNumInfo();
extern DeviceInfo *deviceList;
extern uint32 numDevice;
 #endif //DEVICEMANAGE_H_